package com.hxy.base.enums;

public enum DeleteStatus {
    ALL(-1, "全部"),
    NOT_DELETE(0, "未删除"),
    //    DEFAULT(0, "默认"),
    DELETE(1, "删除");

    private Integer value;
    private String name;

    DeleteStatus(int value, String name) {
        this.value = value;
        this.name = name;
    }


    public Integer getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static Integer getValue(String desc) {
        for (DeleteStatus en : DeleteStatus.values()) {
            if (en.getName().equals(desc)) {
                return en.getValue();
            }
        }
        return 0;
    }

    public static String getName(Integer value) {
        for (DeleteStatus en : DeleteStatus.values()) {
            if (en.getValue().equals(value)) {
                return en.getName();
            }
        }
        return "";
    }

}
